from django.shortcuts import render
#
# class Person(object):
#     def __init__(self,username):
#         self.username = username
# def index(request):
#     p = Person("jiangjiejie")
#     context = {
#         # 'person':{
#         #     'username':p.username
#         # }
#         # 'person':(
#         #     '红楼梦',
#         #     '西红柿首富',
#         #     '金什么梅',
#         #     '水浒传'
#         # )
#     }
#     return render(request,'index.html',context=context)


def index(request):
    # context = {
    #     'age':20
    # }
    # context = {
    #     #     'heros':[
    #     #         '陈冠希',
    #     #         '加藤鹰',
    #     #     ]
    #     # }

    context = {
        # 'books':[
        #     {
        #         'name':'91wangfan是无法超越的',
        #         'author':'91wangfan',
        #         'price':199
        #     },
        #     {
        #         'name': '91wangfan的童年',
        #         'author': '91wangfan',
        #         'price': 299
        #     },
        #     {
        #         'name': 'xiaoqiao与91wangfan的演绎生涯',
        #         'author': 'xiaoqiao',
        #         'price': 200
        #     },
        #     {
        #         'name': '91wangfan的10条jianuyi',
        #         'author': '91wangfan',
        #         'price': 66
        #     }
        # ],
        # 'person':{
        #     'username':'kangbazi',
        #     'age':18,
        #     'height':'185cm',
        # },
        # 'comments':[
        #
        # ]
        'person':[
            '张三',
            '李四',
            '91wangfan'
        ]
    }
    return render(request, 'index.html', context=context)